<template>
  <div>
      <div>
        全选
        <!-- 双向绑定 -->
        <el-checkbox  v-model="qx" @change="hjwqx"></el-checkbox>
        <!-- 已选择的个数 -->
        已选择:{{$store.getters.num}}
        <!-- 全部个数 -->
        全部:{{$store.state.addList.length}}
        <!-- 点击删除 -->
          <el-button type="danger" plain @click="hjwremove">删除所有已选</el-button>
      </div>
  </div>
</template>

<script>
export default {
  name: '',
  data() {
    return {
      // 定义一个值
      qx: false
    };
  },
  mounted() {},
  methods: {
    
      hjwqx(){
        // 传到vuex中
        console.log(this.qx);
        this.$store.commit("hjwqx",this.qx);
    },
    hjwremove(){
      // 选中删除
         this.$store.commit("hjwremove");
    }
  },
  computed: {},
  components: {},
  watch: {},
  getters:{},
};
</script>

<style scoped>
</style>